<?php


namespace App\Models\Log;


use App\Models\BaseModel;


class Import extends BaseModel
{
    protected $table = 'log__imports';

    protected $fillable = [
        'id',
        'type',
        'total',
        'success',
        'user_id',
        'error',
        'file_name',
        'import_time',
        'original_file_id',
        'error_file_id',
        'deleted_at',
        'updated_at',
        'created_at',
    ];

    const TYPE_KEY = 'IT';

    /**
     * 评论对象类型
     * @param $key
     * @return mixed
     */
    public function getTypeTextAttribute($key)
    {
        return $this->getCode(self::TYPE_KEY, $key);
    }
}
